Skip to content

fix: updated logic to update versions with scripts for nightly#1165

Merged
lucaseduoli merged 17 commits intomainfrom
fix/nightly_tags
Mar 19, 2026
Merged

fix: updated logic to update versions with scripts for nightly#1165
lucaseduoli merged 17 commits intomainfrom
fix/nightly_tags

Conversation

@lucaseduoli
Copy link
Collaborator

This pull request refactors the nightly build workflow to automate versioning and tagging for nightly releases, and introduces several scripts to manage the project name and version in pyproject.toml. The workflow now generates a unique nightly tag based on published versions, updates project metadata, and pushes the tag to the repository. These changes ensure consistent and compliant nightly builds and simplify the version management process.

Nightly build workflow automation

  • Replaced the check-version job with a new create-nightly-tag job in .github/workflows/nightly-build.yml, which checks out the code, sets up Python, installs dependencies, generates a nightly tag using a script, updates pyproject.toml, commits, tags, and pushes the nightly tag.
  • Updated dependencies between jobs (build, manifest, and publish-pypi) to reference create-nightly-tag instead of check-version, ensuring correct job sequencing. [1] [2]

Version and tag management

  • Replaced manual version update logic in the publish-pypi job with logic to fetch and checkout the correct nightly tag, ensuring builds use the tagged version.
  • Added scripts/ci/pypi_nightly_tag.py to generate a new nightly tag based on the latest published nightly version, following PEP 440 conventions.

Project metadata update scripts

  • Added scripts/ci/update_pyproject_combined.py to update both the project name and version in pyproject.toml for nightly builds.
  • Added scripts/ci/update_pyproject_name.py and scripts/ci/update_pyproject_version.py to separately update the project name and version fields in pyproject.toml. [1] [2]

@lucaseduoli lucaseduoli self-assigned this Mar 17, 2026
@github-actions github-actions bot added ci ⬛ CI/CD, build, and infrastructure issues bug 🔴 Something isn't working. labels Mar 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the nightly build pipeline to generate a PEP 440–compliant nightly version/tag based on what’s already published to PyPI, update pyproject.toml metadata for a nightly distribution, and publish artifacts from that tagged commit.

Changes:

  • Introduces CI scripts to generate a new nightly tag from PyPI state and update pyproject.toml name/version for nightly builds.
  • Replaces the workflow’s check-version job with create-nightly-tag, committing/tagging the updated metadata and pushing the nightly tag.
  • Updates downstream jobs to depend on the new tag-creation job and attempts to publish PyPI artifacts from the created tag.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
.github/workflows/nightly-build.yml Adds create-nightly-tag and adjusts job dependencies/checkout logic for nightly tagging and publishing.
scripts/ci/pypi_nightly_tag.py Generates a nightly version tag using the latest base version in pyproject.toml and the latest published openrag-nightly version on PyPI.
scripts/ci/update_pyproject_combined.py Orchestrates updating both the project name and version for nightly builds.
scripts/ci/update_pyproject_name.py Updates the name = "..."" field in pyproject.toml.
scripts/ci/update_pyproject_version.py Updates the version = "..."" field in pyproject.toml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the lgtm label Mar 18, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
@github-actions github-actions bot added the backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) label Mar 19, 2026
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
@lucaseduoli lucaseduoli requested a review from Copilot March 19, 2026 01:24
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the nightly release pipeline to generate a PyPI-compliant nightly version/tag and update pyproject.toml via dedicated CI scripts, then uses that tag across Docker image publishing and PyPI publishing.

Changes:

  • Replaced the nightly “check-version” logic with a create-nightly-tag job that generates a nightly tag, updates pyproject.toml, commits, tags, and pushes the tag.
  • Added CI helper scripts to generate nightly tags from PyPI state and to update pyproject.toml name/version.
  • Updated runtime version detection to work with both openrag and openrag-nightly distributions.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/nightly-build.yml Introduces the new nightly tagging job and rewires downstream jobs to use the nightly tag.
scripts/ci/pypi_nightly_tag.py Generates the nightly tag based on pyproject.toml + latest published nightly version.
scripts/ci/update_pyproject_combined.py Orchestrates name/version updates for nightly builds.
scripts/ci/update_pyproject_name.py Updates the project name in pyproject.toml.
scripts/ci/update_pyproject_version.py Updates the project version in pyproject.toml.
src/utils/version_utils.py Looks up version from either openrag or openrag-nightly dist metadata.
src/tui/utils/version_check.py Updates TUI version discovery to support openrag-nightly.
Comments suppressed due to low confidence (1)

.github/workflows/nightly-build.yml:109

  • build currently checks out the default branch tip, not the commit that was tagged in create-nightly-tag. Since the workflow mutates pyproject.toml and tags that commit, building from main risks publishing Docker images whose contents/version don’t match the nightly tag. Update the actions/checkout step in build to checkout ref: ${{ needs.create-nightly-tag.outputs.nightly_version }} (and ensure tags are fetchable) so images are built from the tagged snapshot.
  build:
    needs: create-nightly-tag
    strategy:
      fail-fast: false
      matrix:
        include:
          # backend
          - image: backend
            file: ./Dockerfile.backend
            service: openrag-backend
            platform: linux/amd64
            arch: amd64
            runs-on: ubuntu-latest
          - image: backend
            file: ./Dockerfile.backend
            service: openrag-backend
            platform: linux/arm64
            arch: arm64
            runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]

          # frontend
          - image: frontend
            file: ./Dockerfile.frontend
            service: openrag-frontend
            platform: linux/amd64
            arch: amd64
            runs-on: ubuntu-latest
          - image: frontend
            file: ./Dockerfile.frontend
            service: openrag-frontend
            platform: linux/arm64
            arch: arm64
            runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]

          # langflow
          - image: langflow
            file: ./Dockerfile.langflow
            service: openrag-langflow
            platform: linux/amd64
            arch: amd64
            runs-on: ubuntu-latest
          - image: langflow
            file: ./Dockerfile.langflow
            service: openrag-langflow
            platform: linux/arm64
            arch: arm64
            runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]


    runs-on: ${{ matrix.runs-on }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
lucaseduoli and others added 2 commits March 18, 2026 22:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
@lucaseduoli lucaseduoli requested a review from Copilot March 19, 2026 01:56
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the nightly build workflow to generate and push a PEP 440-style nightly Git tag, update pyproject.toml for the nightly distribution name/version, and ensure runtime version detection works for both openrag and openrag-nightly.

Changes:

  • Replaced the nightly workflow’s version job with a create-nightly-tag job that generates a nightly tag, updates pyproject.toml, commits, tags, and pushes.
  • Added CI scripts to update pyproject.toml name/version and to compute the next nightly version from PyPI metadata.
  • Updated version-detection utilities to read the installed distribution version from either openrag or openrag-nightly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/nightly-build.yml Adds tag creation + pyproject update/commit/tag flow; updates downstream jobs to use the new nightly tag output.
scripts/ci/pypi_nightly_tag.py Computes the next nightly dev version based on current pyproject.toml and latest published nightly on PyPI.
scripts/ci/update_pyproject_combined.py Orchestrates updating both package name and version for nightly.
scripts/ci/update_pyproject_name.py Updates the [project].name line in pyproject.toml.
scripts/ci/update_pyproject_version.py Updates the [project].version line in pyproject.toml.
src/utils/version_utils.py Extends version lookup to support openrag-nightly distribution.
src/tui/utils/version_check.py Extends TUI version lookup to support openrag-nightly distribution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
lucaseduoli and others added 2 commits March 18, 2026 23:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 19, 2026
@lucaseduoli lucaseduoli merged commit 6e9f349 into main Mar 19, 2026
9 checks passed
@github-actions github-actions bot deleted the fix/nightly_tags branch March 19, 2026 02:31
lucaseduoli added a commit that referenced this pull request Mar 19, 2026
* updated logic to update versions with scripts for nightly

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* update import

* remove pyproject from update version

* updated update_pyproject_name

* updated nightly logic

* changed things for github

* fix github nitpicks

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. ci ⬛ CI/CD, build, and infrastructure issues lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants